<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
<button class="sendBtn">发送消息</button>
<script type="module">
    import { sendMsg } from "./index.js";
    const btn = document.querySelector('.sendBtn');
    console.log(btn);
    btn.addEventListener('click', () => {
        sendMsg({
            name: "jrd",
            age: 18
        })
    }, false);
</script>
</body>
</html>